#include <Form.h>
void Form::Form()
{
    btnOutput.registerClickHandler(output);
}

const Format& Form::getFormat()
{
    if(radioBtnCascade.isSelected())
        return CASCADE_FORMAT;
    else
        return BASE_FORMAT;
}

void Form::output()
{
    StringStream oss;

    PeopleList::getNormalPeoples().toString(oss,getFormat());
    listBoxNormalPeople.display(oos);

    oss.clear();
    PeopleList::getFamousPeoples().toString(oss,getFormat());
    listBoxFamousPeople.display(oos);   
}

